<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>netLink C++ 11: netLink::Socket Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">netLink C++ 11
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>netLink</b></li><li class="navelem"><a class="el" href="classnet_link_1_1_socket.html">Socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classnet_link_1_1_socket-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">netLink::Socket Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> and stream buffer.  
 <a href="classnet_link_1_1_socket.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_socket_8h_source.html">Socket.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for netLink::Socket:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classnet_link_1_1_socket.png" usemap="#netLink::Socket_map" alt=""/>
  <map id="netLink::Socket_map" name="netLink::Socket_map">
<area href="classnet_link_1_1_msg_pack_socket.html" title="Socket with MsgPack abstraction layer." alt="netLink::MsgPackSocket" shape="rect" coords="0,112,148,136"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:adffee851ad5d6175260d1a49e9b032ee"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">IPVersion</a> { <a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269">IPv4</a>
, <a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16">IPv6</a>
, <a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8">ANY</a>
 }</td></tr>
<tr class="memdesc:adffee851ad5d6175260d1a49e9b032ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the version of IP.  <a href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">More...</a><br /></td></tr>
<tr class="separator:adffee851ad5d6175260d1a49e9b032ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9757ba19d83716e413fdc2ce324c53ed"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">Type</a> { <br />
&#160;&#160;<a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199">NONE</a>
, <a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17">TCP_CLIENT</a>
, <a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811">TCP_SERVER</a>
, <a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927">TCP_SERVERS_CLIENT</a>
, <br />
&#160;&#160;<a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f">UDP_PEER</a>
<br />
 }</td></tr>
<tr class="memdesc:a9757ba19d83716e413fdc2ce324c53ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the nature of a socket.  <a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">More...</a><br /></td></tr>
<tr class="separator:a9757ba19d83716e413fdc2ce324c53ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97d865489970e8bad3122107b819292e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">Status</a> { <br />
&#160;&#160;<a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de">NOT_CONNECTED</a>
, <a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7">CONNECTING</a>
, <a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab">LISTENING</a>
, <a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f">READY</a>
, <br />
&#160;&#160;<a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481">BUSY</a>
<br />
 }</td></tr>
<tr class="memdesc:a97d865489970e8bad3122107b819292e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the send status of a socket.  <a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">More...</a><br /></td></tr>
<tr class="separator:a97d865489970e8bad3122107b819292e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a571f756f8aa4f199cc7cc8db313bde98"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a571f756f8aa4f199cc7cc8db313bde98">initAsTcpClient</a> (const std::string &amp;<a class="el" href="classnet_link_1_1_socket.html#a956e599cb177baf7f24f3cea2f5a475b">hostRemote</a>, unsigned <a class="el" href="classnet_link_1_1_socket.html#af16d02ebbad7e45dce6a68f3e60cb89d">portRemote</a>, bool waitUntilConnected=false)</td></tr>
<tr class="separator:a571f756f8aa4f199cc7cc8db313bde98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a477d9c082e3c7636bb7e103e8d617e11"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a477d9c082e3c7636bb7e103e8d617e11">initAsTcpServer</a> (const std::string &amp;<a class="el" href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">hostLocal</a>, unsigned <a class="el" href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">portLocal</a>, unsigned listenQueue=16)</td></tr>
<tr class="separator:a477d9c082e3c7636bb7e103e8d617e11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a579fee22b3df524283e0462f0ce4eb6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a579fee22b3df524283e0462f0ce4eb6a">initAsUdpPeer</a> (const std::string &amp;<a class="el" href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">hostLocal</a>, unsigned <a class="el" href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">portLocal</a>)</td></tr>
<tr class="separator:a579fee22b3df524283e0462f0ce4eb6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0007fa1cf09e1d324a40740460f975e9"><td class="memItemLeft" align="right" valign="top"><a id="a0007fa1cf09e1d324a40740460f975e9" name="a0007fa1cf09e1d324a40740460f975e9"></a>
<a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">IPVersion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getIPVersion</b> () const</td></tr>
<tr class="memdesc:a0007fa1cf09e1d324a40740460f975e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the IPVersion of the socket. <br /></td></tr>
<tr class="separator:a0007fa1cf09e1d324a40740460f975e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a904a83ca162708b193be85c9b310cba7"><td class="memItemLeft" align="right" valign="top"><a id="a904a83ca162708b193be85c9b310cba7" name="a904a83ca162708b193be85c9b310cba7"></a>
<a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">Type</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getType</b> () const</td></tr>
<tr class="memdesc:a904a83ca162708b193be85c9b310cba7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the SocketType of the socket. <br /></td></tr>
<tr class="separator:a904a83ca162708b193be85c9b310cba7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ab9daab65cd5f2f0402c46785858024"><td class="memItemLeft" align="right" valign="top"><a id="a5ab9daab65cd5f2f0402c46785858024" name="a5ab9daab65cd5f2f0402c46785858024"></a>
<a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getStatus</b> () const</td></tr>
<tr class="memdesc:a5ab9daab65cd5f2f0402c46785858024"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the SocketStatus of the socket. <br /></td></tr>
<tr class="separator:a5ab9daab65cd5f2f0402c46785858024"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45b84b56d91ba13f163e27c8a5f5b5d7"><td class="memItemLeft" align="right" valign="top">std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a45b84b56d91ba13f163e27c8a5f5b5d7">showmanyc</a> ()</td></tr>
<tr class="separator:a45b84b56d91ba13f163e27c8a5f5b5d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37881f83ff1b3e38033ac11896a8121c"><td class="memItemLeft" align="right" valign="top">std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a37881f83ff1b3e38033ac11896a8121c">receive</a> (char_type *buffer, std::streamsize size)</td></tr>
<tr class="separator:a37881f83ff1b3e38033ac11896a8121c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a030ae9949ab2d23ece036dac7aae42d4"><td class="memItemLeft" align="right" valign="top">std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a030ae9949ab2d23ece036dac7aae42d4">send</a> (const char_type *buffer, std::streamsize size)</td></tr>
<tr class="separator:a030ae9949ab2d23ece036dac7aae42d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3816a9a6221d3007a78e4d21e24f6166"><td class="memItemLeft" align="right" valign="top">std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a3816a9a6221d3007a78e4d21e24f6166">redirect</a> (const std::vector&lt; std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; &gt; &amp;destinations)</td></tr>
<tr class="separator:a3816a9a6221d3007a78e4d21e24f6166"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a160f1b17b2591bd5b0f0f4799d1605"><td class="memItemLeft" align="right" valign="top"><a id="a2a160f1b17b2591bd5b0f0f4799d1605" name="a2a160f1b17b2591bd5b0f0f4799d1605"></a>
std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><b>getInputBufferSize</b> ()</td></tr>
<tr class="memdesc:a2a160f1b17b2591bd5b0f0f4799d1605"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the input intermediate buffer in bytes. <br /></td></tr>
<tr class="separator:a2a160f1b17b2591bd5b0f0f4799d1605"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af992596ec1a9f0fd75b333729fc199a0"><td class="memItemLeft" align="right" valign="top"><a id="af992596ec1a9f0fd75b333729fc199a0" name="af992596ec1a9f0fd75b333729fc199a0"></a>
std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><b>getOutputBufferSize</b> ()</td></tr>
<tr class="memdesc:af992596ec1a9f0fd75b333729fc199a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the output intermediate buffer in bytes. <br /></td></tr>
<tr class="separator:af992596ec1a9f0fd75b333729fc199a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4b53976793d839ae1d09278e8cfcd2e"><td class="memItemLeft" align="right" valign="top"><a id="ab4b53976793d839ae1d09278e8cfcd2e" name="ab4b53976793d839ae1d09278e8cfcd2e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setInputBufferSize</b> (std::streamsize size)</td></tr>
<tr class="memdesc:ab4b53976793d839ae1d09278e8cfcd2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the size of the input intermediate buffer in bytes (unread contents are lost) <br /></td></tr>
<tr class="separator:ab4b53976793d839ae1d09278e8cfcd2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39727b2cb0245111f492cc21bc622827"><td class="memItemLeft" align="right" valign="top"><a id="a39727b2cb0245111f492cc21bc622827" name="a39727b2cb0245111f492cc21bc622827"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setOutputBufferSize</b> (std::streamsize size)</td></tr>
<tr class="memdesc:a39727b2cb0245111f492cc21bc622827"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the size of the output intermediate buffer in bytes (unwritten contents are lost) <br /></td></tr>
<tr class="separator:a39727b2cb0245111f492cc21bc622827"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f19bae6289683c2f41084db0989155b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a7f19bae6289683c2f41084db0989155b">setBlockingMode</a> (bool blocking)</td></tr>
<tr class="separator:a7f19bae6289683c2f41084db0989155b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19b1ff35f08e984080e80d24db94b989"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a19b1ff35f08e984080e80d24db94b989">setBroadcast</a> (bool active)</td></tr>
<tr class="separator:a19b1ff35f08e984080e80d24db94b989"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8aea124f7c80dcc802fb60fef34523a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#ab8aea124f7c80dcc802fb60fef34523a">setMulticastGroup</a> (const std::string &amp;address, bool join)</td></tr>
<tr class="separator:ab8aea124f7c80dcc802fb60fef34523a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bfd52a5caebfc57f459754885160bcc"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a4bfd52a5caebfc57f459754885160bcc">accept</a> ()</td></tr>
<tr class="separator:a4bfd52a5caebfc57f459754885160bcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac078338471cceaa79e6dbfac1926cf59"><td class="memItemLeft" align="right" valign="top"><a id="ac078338471cceaa79e6dbfac1926cf59" name="ac078338471cceaa79e6dbfac1926cf59"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>disconnect</b> ()</td></tr>
<tr class="memdesc:ac078338471cceaa79e6dbfac1926cf59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects the socket, deletes the intermediate buffers and sets the handle to -1. <br /></td></tr>
<tr class="separator:ac078338471cceaa79e6dbfac1926cf59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ca18424fecd2dfdf3f6e5a0c750fd5f"><td class="memItemLeft" align="right" valign="top"><a id="a2ca18424fecd2dfdf3f6e5a0c750fd5f" name="a2ca18424fecd2dfdf3f6e5a0c750fd5f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>disconnectOnError</b> ()</td></tr>
<tr class="memdesc:a2ca18424fecd2dfdf3f6e5a0c750fd5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if there is a problem with this socket and disconnect in case there is one. <br /></td></tr>
<tr class="separator:a2ca18424fecd2dfdf3f6e5a0c750fd5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a6c9c8a24279538cd7e82556329d97e4d"><td class="memItemLeft" align="right" valign="top"><a id="a6c9c8a24279538cd7e82556329d97e4d" name="a6c9c8a24279538cd7e82556329d97e4d"></a>
std::set&lt; std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>clients</b></td></tr>
<tr class="memdesc:a6c9c8a24279538cd7e82556329d97e4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Client sockets of a server. <br /></td></tr>
<tr class="separator:a6c9c8a24279538cd7e82556329d97e4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c33dad2df50e579373db5f1de32789b"><td class="memItemLeft" align="right" valign="top"><a id="a0c33dad2df50e579373db5f1de32789b" name="a0c33dad2df50e579373db5f1de32789b"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>hostLocal</b></td></tr>
<tr class="memdesc:a0c33dad2df50e579373db5f1de32789b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Host string of local. <br /></td></tr>
<tr class="separator:a0c33dad2df50e579373db5f1de32789b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a956e599cb177baf7f24f3cea2f5a475b"><td class="memItemLeft" align="right" valign="top"><a id="a956e599cb177baf7f24f3cea2f5a475b" name="a956e599cb177baf7f24f3cea2f5a475b"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>hostRemote</b></td></tr>
<tr class="memdesc:a956e599cb177baf7f24f3cea2f5a475b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Host string of remote. <br /></td></tr>
<tr class="separator:a956e599cb177baf7f24f3cea2f5a475b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f595f82acb8d2c13ffd53e48346a53f"><td class="memItemLeft" align="right" valign="top"><a id="a5f595f82acb8d2c13ffd53e48346a53f" name="a5f595f82acb8d2c13ffd53e48346a53f"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>portLocal</b></td></tr>
<tr class="memdesc:a5f595f82acb8d2c13ffd53e48346a53f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Port of local. <br /></td></tr>
<tr class="separator:a5f595f82acb8d2c13ffd53e48346a53f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af16d02ebbad7e45dce6a68f3e60cb89d"><td class="memItemLeft" align="right" valign="top"><a id="af16d02ebbad7e45dce6a68f3e60cb89d" name="af16d02ebbad7e45dce6a68f3e60cb89d"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>portRemote</b></td></tr>
<tr class="memdesc:af16d02ebbad7e45dce6a68f3e60cb89d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Port of remote. <br /></td></tr>
<tr class="separator:af16d02ebbad7e45dce6a68f3e60cb89d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a2bfbb3d0188794023985874d08627e80"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a2bfbb3d0188794023985874d08627e80">initSocket</a> (bool blocking)</td></tr>
<tr class="separator:a2bfbb3d0188794023985874d08627e80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d1495674002a06ef1c1ae68e9da99c4"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket.html#a3d1495674002a06ef1c1ae68e9da99c4">SocketFactory</a> ()</td></tr>
<tr class="memdesc:a3d1495674002a06ef1c1ae68e9da99c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates new sockets for client connections of a server.  <br /></td></tr>
<tr class="separator:a3d1495674002a06ef1c1ae68e9da99c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aac1c17565a586bbff36ae95d5f00d4f3"><td class="memItemLeft" align="right" valign="top"><a id="aac1c17565a586bbff36ae95d5f00d4f3" name="aac1c17565a586bbff36ae95d5f00d4f3"></a>
<a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">IPVersion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ipVersion</b></td></tr>
<tr class="memdesc:aac1c17565a586bbff36ae95d5f00d4f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">IP version which is in use. <br /></td></tr>
<tr class="separator:aac1c17565a586bbff36ae95d5f00d4f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac75a94d671b640640567a71f6a45fc12"><td class="memItemLeft" align="right" valign="top"><a id="ac75a94d671b640640567a71f6a45fc12" name="ac75a94d671b640640567a71f6a45fc12"></a>
<a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">Type</a>&#160;</td><td class="memItemRight" valign="bottom"><b>type</b></td></tr>
<tr class="memdesc:ac75a94d671b640640567a71f6a45fc12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of the socket. <br /></td></tr>
<tr class="separator:ac75a94d671b640640567a71f6a45fc12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a073f10822632d93167ecd56f7779d893"><td class="memItemLeft" align="right" valign="top"><a id="a073f10822632d93167ecd56f7779d893" name="a073f10822632d93167ecd56f7779d893"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>status</b></td></tr>
<tr class="memdesc:a073f10822632d93167ecd56f7779d893"><td class="mdescLeft">&#160;</td><td class="mdescRight">Or listen queue size if socket is TCP_SERVER. <br /></td></tr>
<tr class="separator:a073f10822632d93167ecd56f7779d893"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2da58e9b7c61f78aaad7675ba6b8d80"><td class="memItemLeft" align="right" valign="top"><a id="ae2da58e9b7c61f78aaad7675ba6b8d80" name="ae2da58e9b7c61f78aaad7675ba6b8d80"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>handle</b></td></tr>
<tr class="memdesc:ae2da58e9b7c61f78aaad7675ba6b8d80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle used for the system interface. <br /></td></tr>
<tr class="separator:ae2da58e9b7c61f78aaad7675ba6b8d80"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a43e117b196c850619d5255046edb3e79"><td class="memItemLeft" align="right" valign="top"><a id="a43e117b196c850619d5255046edb3e79" name="a43e117b196c850619d5255046edb3e79"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>SocketManager</b></td></tr>
<tr class="separator:a43e117b196c850619d5255046edb3e79"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> and stream buffer. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="adffee851ad5d6175260d1a49e9b032ee" name="adffee851ad5d6175260d1a49e9b032ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adffee851ad5d6175260d1a49e9b032ee">&#9670;&#160;</a></span>IPVersion</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">netLink::Socket::IPVersion</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the version of IP. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269" name="adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269"></a>IPv4&#160;</td><td class="fielddoc"><p>IPv4 only. </p>
</td></tr>
<tr><td class="fieldname"><a id="adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16" name="adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16"></a>IPv6&#160;</td><td class="fielddoc"><p>IPv6 only. </p>
</td></tr>
<tr><td class="fieldname"><a id="adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8" name="adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8"></a>ANY&#160;</td><td class="fielddoc"><p>IPv4 or IPv6 (choosen by the system) </p>
</td></tr>
</table>

</div>
</div>
<a id="a97d865489970e8bad3122107b819292e" name="a97d865489970e8bad3122107b819292e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97d865489970e8bad3122107b819292e">&#9670;&#160;</a></span>Status</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">netLink::Socket::Status</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the send status of a socket. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de" name="a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de"></a>NOT_CONNECTED&#160;</td><td class="fielddoc"><p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> is not even initialized or disconnected. </p>
</td></tr>
<tr><td class="fieldname"><a id="a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7" name="a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7"></a>CONNECTING&#160;</td><td class="fielddoc"><p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> is initialized but not connected yet and can not send or receive data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab" name="a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab"></a>LISTENING&#160;</td><td class="fielddoc"><p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> is a server and can neither send nor receive data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f" name="a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f"></a>READY&#160;</td><td class="fielddoc"><p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> is connected, can send and receive data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481" name="a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481"></a>BUSY&#160;</td><td class="fielddoc"><p><a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a> is connected and can not send but receive data (at the moment) </p>
</td></tr>
</table>

</div>
</div>
<a id="a9757ba19d83716e413fdc2ce324c53ed" name="a9757ba19d83716e413fdc2ce324c53ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9757ba19d83716e413fdc2ce324c53ed">&#9670;&#160;</a></span>Type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">netLink::Socket::Type</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the nature of a socket. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199" name="a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199"></a>NONE&#160;</td><td class="fielddoc"><p>No type defined. </p>
</td></tr>
<tr><td class="fieldname"><a id="a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17" name="a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17"></a>TCP_CLIENT&#160;</td><td class="fielddoc"><p>TCP socket connecting to a server. </p>
</td></tr>
<tr><td class="fieldname"><a id="a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811" name="a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811"></a>TCP_SERVER&#160;</td><td class="fielddoc"><p>TCP socket waiting for TCP_CLIENT to connect. </p>
</td></tr>
<tr><td class="fieldname"><a id="a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927" name="a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927"></a>TCP_SERVERS_CLIENT&#160;</td><td class="fielddoc"><p>TCP socket to represent a TCP_CLIENT connection at the TCP_SERVER. </p>
</td></tr>
<tr><td class="fieldname"><a id="a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f" name="a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f"></a>UDP_PEER&#160;</td><td class="fielddoc"><p>UDP socket. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a4bfd52a5caebfc57f459754885160bcc" name="a4bfd52a5caebfc57f459754885160bcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bfd52a5caebfc57f459754885160bcc">&#9670;&#160;</a></span>accept()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; netLink::Socket::accept </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Accepts a TCP connection and returns it </p><dl class="section return"><dt>Returns</dt><dd>The new accepted socket (type will be TCP_SERVERS_CLIENT) </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Type needs to be TCP_SERVER </dd></dl>

</div>
</div>
<a id="a571f756f8aa4f199cc7cc8db313bde98" name="a571f756f8aa4f199cc7cc8db313bde98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a571f756f8aa4f199cc7cc8db313bde98">&#9670;&#160;</a></span>initAsTcpClient()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::initAsTcpClient </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>hostRemote</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>portRemote</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>waitUntilConnected</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Setup socket as TCP client </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hostRemote</td><td>The remote host to connect to </td></tr>
    <tr><td class="paramname">portRemote</td><td>The remote port to connect to </td></tr>
    <tr><td class="paramname">waitUntilConnected</td><td>Set blocking mode until connected </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a477d9c082e3c7636bb7e103e8d617e11" name="a477d9c082e3c7636bb7e103e8d617e11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a477d9c082e3c7636bb7e103e8d617e11">&#9670;&#160;</a></span>initAsTcpServer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::initAsTcpServer </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>hostLocal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>portLocal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>listenQueue</em> = <code>16</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Setup socket as TCP server </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hostLocal</td><td>The host to be listening to:</td></tr>
  </table>
  </dd>
</dl>
<p>"" or "*" to listen to any incoming data (IPVersion will be choosen by system) "0.0.0.0" to listen to any incoming data (IPVersion will be IPv4) "::0" to listen to any incoming data (IPVersion will be IPv6) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">portLocal</td><td>The local port </td></tr>
    <tr><td class="paramname">listenQueue</td><td>Queue size for outstanding sockets to accept </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a579fee22b3df524283e0462f0ce4eb6a" name="a579fee22b3df524283e0462f0ce4eb6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a579fee22b3df524283e0462f0ce4eb6a">&#9670;&#160;</a></span>initAsUdpPeer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::initAsUdpPeer </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>hostLocal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>portLocal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Setup socket as UDP server </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hostLocal</td><td>The host to be listening to:</td></tr>
  </table>
  </dd>
</dl>
<p>"" or "*" to listen to any incoming data (IPVersion will be choosen by system) "0.0.0.0" to listen to any incoming data (IPVersion will be IPv4) "::0" to listen to any incoming data (IPVersion will be IPv6) A multicast address of the multicast group to listen to </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">portLocal</td><td>The local port </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2bfbb3d0188794023985874d08627e80" name="a2bfbb3d0188794023985874d08627e80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bfbb3d0188794023985874d08627e80">&#9670;&#160;</a></span>initSocket()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::initSocket </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>blocking</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Initzialize system handle </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">blocking</td><td>Waits for connection if true </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a37881f83ff1b3e38033ac11896a8121c" name="a37881f83ff1b3e38033ac11896a8121c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37881f83ff1b3e38033ac11896a8121c">&#9670;&#160;</a></span>receive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::streamsize netLink::Socket::receive </td>
          <td>(</td>
          <td class="paramtype">char_type *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::streamsize&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Receives size bytes into buffer </p><dl class="section return"><dt>Returns</dt><dd>The actual number of bytes which were received </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Type must not be TCP_SERVER and status must be READY or BUSY </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>In most cases you don't want to call this directly but use the iostream API instead (see wiki) </dd></dl>

</div>
</div>
<a id="a3816a9a6221d3007a78e4d21e24f6166" name="a3816a9a6221d3007a78e4d21e24f6166"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3816a9a6221d3007a78e4d21e24f6166">&#9670;&#160;</a></span>redirect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::streamsize netLink::Socket::redirect </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>destinations</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Redirects received data to all Sockets in destinations </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">destinations</td><td>A list of destinations to sent the data to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The actual number of bytes which were redirected </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>If one destination can't handle the outgoing load, a Expection is thrown and all other destinations get out of sync (data loss) </dd></dl>

</div>
</div>
<a id="a030ae9949ab2d23ece036dac7aae42d4" name="a030ae9949ab2d23ece036dac7aae42d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a030ae9949ab2d23ece036dac7aae42d4">&#9670;&#160;</a></span>send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::streamsize netLink::Socket::send </td>
          <td>(</td>
          <td class="paramtype">const char_type *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::streamsize&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sends size bytes from buffer </p><dl class="section return"><dt>Returns</dt><dd>The actual number of bytes which were sent </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Type must not be TCP_SERVER and status must be READY </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>In most cases you don't want to call this directly but use the iostream API instead (see wiki) </dd></dl>

</div>
</div>
<a id="a7f19bae6289683c2f41084db0989155b" name="a7f19bae6289683c2f41084db0989155b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f19bae6289683c2f41084db0989155b">&#9670;&#160;</a></span>setBlockingMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::setBlockingMode </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>blocking</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Updates the blocking mode of the socket. A socket will be non blocking by default. Try to avoid using blocking mode. Use a <a class="el" href="classnet_link_1_1_socket_manager.html" title="Manages a group of Sockets.">SocketManager</a> with listen(sec &gt; 0.0) instead. </p>

</div>
</div>
<a id="a19b1ff35f08e984080e80d24db94b989" name="a19b1ff35f08e984080e80d24db94b989"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19b1ff35f08e984080e80d24db94b989">&#9670;&#160;</a></span>setBroadcast()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::setBroadcast </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>active</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enables or disables the broadcasting (only relevant for sending) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">active</td><td>If true enables broadcasting else disables broadcasting </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>Type needs to be UDP_PEER and IPv4 </dd></dl>

</div>
</div>
<a id="ab8aea124f7c80dcc802fb60fef34523a" name="ab8aea124f7c80dcc802fb60fef34523a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8aea124f7c80dcc802fb60fef34523a">&#9670;&#160;</a></span>setMulticastGroup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::Socket::setMulticastGroup </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>join</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Joines or leaves a muticast group (only relevant for receiving) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>Address of the group </td></tr>
    <tr><td class="paramname">join</td><td>If true it joines the group else it leaves it </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>Type needs to be UDP_PEER </dd></dl>

</div>
</div>
<a id="a45b84b56d91ba13f163e27c8a5f5b5d7" name="a45b84b56d91ba13f163e27c8a5f5b5d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45b84b56d91ba13f163e27c8a5f5b5d7">&#9670;&#160;</a></span>showmanyc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::streamsize netLink::Socket::showmanyc </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns only the number of outstanding bytes to be received from the system cache </p><dl class="section return"><dt>Returns</dt><dd>Number of bytes in the system cache, not including iostream buffers </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Use in_avail() instead if you are interested in the total number of bytes which can be read </dd></dl>

</div>
</div>
<a id="a3d1495674002a06ef1c1ae68e9da99c4" name="a3d1495674002a06ef1c1ae68e9da99c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d1495674002a06ef1c1ae68e9da99c4">&#9670;&#160;</a></span>SocketFactory()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; netLink::Socket::SocketFactory </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates new sockets for client connections of a server. </p>

<p>Reimplemented in <a class="el" href="classnet_link_1_1_msg_pack_socket.html#a937130fd4b536e8956a373c5a01f0f6e">netLink::MsgPackSocket</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="_socket_8h_source.html">Socket.h</a></li>
<li>src/Socket.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
